
<html>
  
  <HEAD>
    
    <link rel="stylesheet" href="style/default.css" type="text/css">
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  
    <title>JAXB RI 2.1.9 fcs -- DTD Support
    </title>
    <link rel="alternate" href="https://jaxb.dev.java.net/servlets/ProjectNewsRSS" type="application/rss+xml">
  </HEAD>

  
  <BODY>
    <h1>
      <banner>
    Java
        <sup>
          <font size="-2">TM</font>
        </sup> Architecture for XML Binding
  
      </banner>
      <br>
      DTD Support 
    
    </h1>
    <center>
      <b>Implementation Version:</b> 2.1.9 fcs
      <br>
    </center>
    <table class="navbar" cellspacing="0">
      <tr>
        <td class="inactive">
          <a href="index.html">JAXB 2.0</a>
        </td>
        <td class="inactive">
          <a href="xjc.html">Tools</a>
        </td>
        <td class="inactive">
          <a href="jaxb-1_0.html">JAXB 1.0.x</a>
        </td>
        <td class="active">
          <a>JAXB RI Extensions</a>
        </td>
        <td class="inactive">
          <a href="community.html">JAXB Community</a>
        </td>
      </tr>
    </table>
    <div class="subnavbar">
      <ul>
        <li class="first">
          <a href="vendor.html">
            <span>Overview </span>
          </a>
        </li>
        <li>
          <a href="vendorProperties.html">
            <span>Runtime Properties </span>
          </a>
        </li>
        <li>
          <a href="vendorCustomizations.html">
            <span>XJC Customizations </span>
          </a>
        </li>
        <li>
          <a href="vendorSchemaLangs.html">
            <span class="active">DTD </span>
          </a>
        </li>
        <li>
          <a href="developPlugins.html">
            <span>Develop Plugins </span>
          </a>
        </li>
      </ul>
    </div>
    
    <header></header>

	
    <h2>DTD</h2>
	
    <p>
		The JAXB RI is shipped with experimental DTD support, which lets you compile XML DTDs.
	
    <p>
		To compile a DTD 
      <code>test.dtd</code>, run the XJC binding compiler as follows:

      <pre>
$ xjc.sh -dtd test.dtd
</pre>
	
    
    <p>
		All the other command-line options of the XJC binding compiler 
		can be applied.
		
		Similarly, the 
      <tt>XJC</tt> 
      <a href="http://jakarta.apache.org/ant/">ant</a> task supports DTD.
		The generated code will be no different from what is generated from W3C XML Schema.
		You'll use the same JAXB API to access the generated code, and it is portable in the sense that it will run on any JAXB 2.0 implementation.
	
	
    
    <h3>Customization</h3>
	
    <p>
		The customization syntax for DTD is roughly based on the ver.0.21 working draft of the JAXB specification, which is available at 
      <a href="http://xml.coverpages.org/jaxb0530spec.pdf">xml.coverpages.org</a>. The deviations from this document are:
	
      <ul>
		
        <li>The 
          <tt>whitespace</tt> attribute of the 
		
          <tt>conversion</tt> element takes "
          <tt>preserve</tt>", 
		"
          <tt>replace</tt>", and "
          <tt>collapse</tt>" instead of 
		"
          <tt>preserve</tt>","
          <tt>normalize</tt>", and 
		"
          <tt>collapse</tt>" as specified in the document.
		
        </li>
        <li>The 
          <tt>interface</tt> customization just generates marker 
		interfaces with no method.
	
        </li>
      </ul>
	
    
    
    <hr>
    
    <div class="footer">
      $Revision: 1.1 $
      <br>
      $Date: 2007/12/05 00:49:15 $
    
    </div>
  


  </BODY>
</html>